<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>

    <script src="../lib/vue2.js"></script>
  </head>
  <body>
    <div id="box">
      <ul>
        <!-- v-for循环list，会创建多个节点 -->
        <li v-for="data in list">{{data}}</li>

        <li v-for="(data,index) in list">{{data+"-"+index}}</li>
      </ul>

      <script>
        let item = new Vue({
          el: "#box",
          data: {
            list: ["1", "2", "3", "4"],
          },
        });
      </script>
    </div>
  </body>
</html>
